#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

void* my_memcpy(void* str1, const void* str2, size_t n)
{
	void* ret = str1;
	int i = 0;
	for (i = 0; i < n; i++)
	{
		*((char*)str1) = *((char*)str2);
		((char*)str1)++;
		((char*)str2)++;
	}
	return ret;
}

int main()
{
	struct stu
	{
		char name[20];
		int age;
	};
	struct stu z = { "zhangsan",18 };
	struct stu w = { "wangwu",20 };
	my_memcpy(&w, &z, 12);
	return 0;
}